//Longest Substring Without Repeating Characters 

/*
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include<vector>
#include  <map>
using namespace std;

int lengthOfLongestSubstring(string s) {
	int i,j,k,m,n,max=1;
	int flag[300];
	memset(flag,0,sizeof(flag));
	if(s.length()==0)
		return 0;
	else if(s.length()==1)
		return 1;
	i=0;j=1;
	flag[s[0]]=1;
	while(j<s.length()&&i<=j){
		if(!flag[s[j]]){
			flag[s[j]]=1;
			j++;
		}
		else{
			if(j-i>max)
				max=j-i;
			flag[s[i]]=0;
			i++;
		}
	}
	if(j-i>max)
		max=j-i;
	return max;
}
int main(){
	string str;
	while(1){
		cin>>str;
		cout<<lengthOfLongestSubstring(str);
	}
	system("pause");
	return 0;
}
*/